package com.example.dziennikposilkow;

import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class NapojeIAlkohole extends DziennikMainActivity {
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        setContentView(R.layout.activity_napoje_i_alkohole);
        
        final Button button_napoje_i_soki = (Button) findViewById(R.id.buttonNapojeISoki);
      		button_napoje_i_soki.setOnClickListener(new View.OnClickListener() {
      			public void onClick(View v) {

      				String str = "NapojeISoki"; //Data you want to send        
       				Intent intent = new Intent(NapojeIAlkohole.this, TabelaProdukty.class);
      				intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
      				v.getContext().startActivity(intent);
      				
      			}
      			
      		});
      		
      	   final Button button_alkohole = (Button) findViewById(R.id.buttonAlkohole);
     		button_alkohole.setOnClickListener(new View.OnClickListener() {
     			public void onClick(View v) {

     				String str = "Alkohole"; //Data you want to send        
       				Intent intent = new Intent(NapojeIAlkohole.this, TabelaProdukty.class);
     				intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
     				v.getContext().startActivity(intent);
     				
     			}
     			
     		});
	}
}
